<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@include file="/WEB-INF/system/include/common.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>ims</title>
<link rel="stylesheet" type="text/css" href="${jsAndCss}/css/style.css" />
<link rel="stylesheet" href="${jsAndCss}/css/zTreeStyle/zTreeStyle.css" type="text/css">
<link rel="stylesheet" type="text/css" href="${jsAndCss}/css/skin_/nav.css" />
<script type="text/javascript" src="${jsAndCss}/js/jquery.js"></script>
<script type="text/javascript" src="${jsAndCss}/js/global.js"></script>

</head>
<body>
<div id="container">
	<div id="bd">
    	<div class="sidebar">
        	<div class="sidebar-bg"></div>
            <i class="sidebar-hide"></i>
            <%-- <c:set var="modelId" value="${modelId}" /> --%>
            <c:set var="first" value="false" />	
            <c:forEach items="${menuList}" var="menu">
            
            	<c:if test="${menu.menuId eq modelId}">
            		<h2><a href="javascript:;"><i class="h2-icon" title="切换到树型结构"></i><span>${menu.menuName}</span></a></h2>
            		<c:set var="href_pre" value="${menu.href }" />
            	</c:if>
            </c:forEach>
            <!-- <h2><a href="javascript:;"><i class="h2-icon" title="切换到树型结构"></i><span>系统管理</span></a></h2> -->
            <ul class="nav"> 
            	<c:forEach items="${menuList }" var="menu1"> 
            		<c:if test="${menu1.parentId eq modelId && menu1.delFlag eq '0'}">
            			<li class="nav-li ${first ? 'current' : '' }">
                			<a href="javascript:;" class="ue-clear"><i class="nav-ivon"></i><span class="nav-text">${menu1.menuName }</span></a>
	                		<ul class="subnav">
	                		<c:forEach items="${menuList }" var="menu2">
	                			<c:if test="${menu2.parentId eq menu1.menuId && menu2.delFlag eq '0' }">
	                				<li class="subnav-li ${first ? 'current' : '' }" href="${menu2.href }" data-id="${menu2.menuId}"><a href="javascript:;" class="ue-clear"><i class="subnav-icon"></i><span class="subnav-text">${menu2.menuName }</span></a></li>	
	                				<c:set var="first" value="false" />
	                			</c:if>
	                		</c:forEach>
	                    	<!-- <li class="subnav-li current" href="index" data-id="1"><a href="javascript:;" class="ue-clear"><i class="subnav-icon"></i><span class="subnav-text">首页</span></a></li>
	                        <li class="subnav-li" href="form.html" data-id="2"><a href="javascript:;" class="ue-clear"><i class="subnav-icon"></i><span class="subnav-text">性能指标</span></a></li> -->                        
	                    	</ul>
                		</li>
            		</c:if>
            	</c:forEach>             
                <!-- <li class="nav-li current">
                	<a href="javascript:;" class="ue-clear"><i class="nav-ivon"></i><span class="nav-text">系统总览</span></a>
                	<ul class="subnav">
                    	<li class="subnav-li current" href="index" data-id="1"><a href="javascript:;" class="ue-clear"><i class="subnav-icon"></i><span class="subnav-text">首页</span></a></li>
                        <li class="subnav-li" href="form.html" data-id="2"><a href="javascript:;" class="ue-clear"><i class="subnav-icon"></i><span class="subnav-text">性能指标</span></a></li>                        
                    </ul>
                </li>
                <li class="nav-li">
                	<a href="javascript:;" class="ue-clear"><i class="nav-ivon"></i><span class="nav-text">权限管理</span></a>
                    <ul class="subnav">
                    	<li class="subnav-li" href="index.html" data-id="8"><a href="javascript:;" class="ue-clear"><i class="subnav-icon"></i><span class="subnav-text">用户管理</span></a></li>
                        <li class="subnav-li" href="form.html" data-id="9"><a href="javascript:;" class="ue-clear"><i class="subnav-icon"></i><span class="subnav-text">部门管理</span></a></li>
                        <li class="subnav-li" href="table.html" data-id="10"><a href="javascript:;" class="ue-clear"><i class="subnav-icon"></i><span class="subnav-text">菜单管理</span></a></li>
                        <li class="subnav-li" data-id="11"><a href="javascript:;" class="ue-clear"><i class="subnav-icon"></i><span class="subnav-text">角色管理</span></a></li>
                    </ul>
                </li>
                <li class="nav-li">
                	<a href="javascript:;" class="ue-clear"><i class="nav-ivon"></i><span class="nav-text">工作安排</span></a>
                    <ul class="subnav">
                    	<li class="subnav-li" data-id="5"><a href="javascript:;" class="ue-clear"><i class="subnav-icon"></i><span class="subnav-text">工作安排查询1</span></a></li>
                        <li class="subnav-li" data-id="6"><a href="javascript:;" class="ue-clear"><i class="subnav-icon"></i><span class="subnav-text">安排管理1</span></a></li>
                        <li class="subnav-li" data-id="7"><a href="javascript:;" class="ue-clear"><i class="subnav-icon"></i><span class="subnav-text">类型选择1</span></a></li>
                    </ul>
                </li>
                <li class="nav-li last-nav-li">
                	<a href="javascript:;" class="ue-clear"><i class="nav-ivon"></i><span class="nav-text">数据管理</span></a>
                    <ul class="subnav">
                        <li class="subnav-li" href="table.html" data-id="3"><a href="javascript:;" class="ue-clear"><i class="subnav-icon"></i><span class="subnav-text">表格</span></a></li>
                        <li class="subnav-li" data-id="4"><a href="javascript:;" class="ue-clear"><i class="subnav-icon"></i><span class="subnav-text">自定义设置2</span></a></li>
                    	<li class="subnav-li" data-id="12"><a href="javascript:;" class="ue-clear"><i class="subnav-icon"></i><span class="subnav-text">工作安排查询2</span></a></li>
                        <li class="subnav-li" data-id="13"><a href="javascript:;" class="ue-clear"><i class="subnav-icon"></i><span class="subnav-text">安排管理2</span></a></li>
                        <li class="subnav-li" data-id="14"><a href="javascript:;" class="ue-clear"><i class="subnav-icon"></i><span class="subnav-text">类型选择2</span></a></li>
                    </ul>
                </li> -->
            </ul>
            <div class="tree-list outwindow">
            	<div class="tree ztree"></div>
            </div>
        </div>
        <div class="main">
        	<div class="title">
                <i class="sidebar-show"></i>
                <ul class="tab ue-clear">
                   
                </ul>
                <i class="tab-more"></i>
                <i class="tab-close"></i>
            </div>
            <div class="content">
            </div>
        </div>
    </div>
</div>

<div class="more-bab-list">
	<ul></ul>
    <div class="opt-panel-ml"></div>
    <div class="opt-panel-mr"></div>
    <div class="opt-panel-bc"></div>
    <div class="opt-panel-br"></div>
    <div class="opt-panel-bl"></div>
</div>
</body>
<script type="text/javascript" src="${jsAndCss}/js/nav.js"></script>
<script type="text/javascript" src="${jsAndCss}/js/Menu.js"></script>
<script type="text/javascript" src="${jsAndCss}/js/jquery.ztree.core-3.5.js"></script>
<script type="text/javascript">
	var menu = new Menu({
		defaultSelect: $('.nav').find('li[href="${href_pre}/index"]')     //.find('li[data-id="18"]')	
	});
	
	// 左侧树结构加载
	var setting = {};

		var zNodes =[
			{ name:"新闻管理",
			   children: [
				 { name:"新闻视频管理",icon:'${ctxJsAndCss}/img/skin_/leftlist.png'},
				 { name:"新闻频道管理",icon:'${ctxJsAndCss}/img/skin_/leftlist.png'},
				 { name:"地方新闻管理",icon:'${ctxJsAndCss}/img/skin_/leftlist.png'}
			]},
			{ name:"用户信息设置", open:true,
			   children: [
				 { name:"首页", checked:true,icon:'${ctxJsAndCss}/img/skin_/leftlist.png'},
				 { name:"表单",icon:'${ctxJsAndCss}/img/skin_/leftlist.png'},
				 { name:"表格",icon:'${ctxJsAndCss}/img/skin_/leftlist.png'},
				 { name:"自定义设置",icon:'${ctxJsAndCss}/img/skin_/leftlist.png'}
			]},
			{ name:"工作安排",
			   children: [
				 { name:"工作安排",icon:'${ctxJsAndCss}/img/skin_/leftlist.png'},
				 { name:"安排管理",icon:'${ctxJsAndCss}/img/skin_/leftlist.png'},
				 { name:"类型选择",icon:'${ctxJsAndCss}/img/skin_/leftlist.png'},
				 { name:"自定义设置",icon:'${ctxJsAndCss}/img/skin_/leftlist.png'}
			]},
			{ name:"数据管理",
			   children: [
				 { name:"工作安排",icon:'${ctxJsAndCss}/img/skin_/leftlist.png'},
				 { name:"安排管理",icon:'${ctxJsAndCss}/img/skin_/leftlist.png'},
				 { name:"类型选择",icon:'${ctxJsAndCss}/img/skin_/leftlist.png'},
				 { name:"自定义设置",icon:'${ctxJsAndCss}/img/skin_/leftlist.png'}
			]}
		];

	$.fn.zTree.init($(".tree"), setting, zNodes);
	
	
	$('.sidebar h2').click(function(e) {
        $('.tree-list').toggleClass('outwindow');
		$('.nav').toggleClass('outwindow');
    });
	
	$(document).click(function(e) {
		if(!$(e.target).is('.tab-more')){
			 $('.tab-more').removeClass('active');
			 $('.more-bab-list').hide();
		}
    });
</script>
</html>
